#ifndef EXP_CLIENT
#define EXP_CLIENT

#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdio.h>
#include <string>
#include <assert.h>
#include <memory.h>
#include "ClientDescriptor.h"

template<typename MessageType>
class ExampleClient : public ClientDescriptor
{
public:
	ExampleClient(int fd, in_addr client_addr, uint16_t client_port) :
		ClientDescriptor(fd, client_addr, client_port),
		sizeIsRead(false),
		packetSize(0),
		bytes_read(0)
	{
        memset(buffer,0,1024);
        data_buffer.clear();
	}

	bool ReadReady() override;
	bool WriteReady() override;
	bool HeartBeat() override;
	void ClientClose() override;
	void ServerClose() override;

protected:
    bool sizeIsRead;
	char buffer[1024];
    int packetSize;
    std::string data_buffer;
    int bytes_read;
};

#endif

